
/**
 *  \file vcp_internal.h
 *
 *  \brief This file defines the Volume Control Profile Interface
 */

/*
 *  Copyright (C) 2020. Mindtree Ltd.
 *  All rights reserved.
 */

#ifndef _H_VCP_INTERNAL_
#define _H_VCP_INTERNAL_


/* --------------------------------------------- Header File Inclusion */
#include "GA_api.h"

#include "GA_bearer_api.h"
#include "BT_common.h"

#include "vcp.h"

/* --------------------------------------------- Global Definitions */

#define VCP_SERVICE_TYPE_VCS              0x00
#define VCP_SERVICE_TYPE_VOCS             0x01
#define VCP_SERVICE_TYPE_AICS             0x02

/* --------------------------------------------- Data types /Structures */

/* --------------------------------------------- Macros */
/** TODO :
* Move this section to some other location
*/
#if 1
#define GA_ERR(...)
#define GA_TRC(...)
#define GA_INF(...)
#else
#define GA_ERR printf
#define GA_TRC printf
#define GA_INF printf

#endif
/* --------------------------------------------- APIs */

GA_RESULT vcp_brr_callback
          (
              /* IN */ GA_BRR_DEVICE * device,
              /* IN */ UINT8 event_type,
              /* IN */ UINT16 event_status,
              /* IN */ void * event_data,
              /* IN */ UINT16 event_datalen
          );

GA_RESULT vcp_set_context
          (
              /* IN  */ UCHAR   srvc_type,
              /* OUT */ void   **cntx_pointer,
              /* OUT */ UCHAR  *cntx_indx
          );

GA_RESULT vcp_get_context
          (
              /* IN    */ void   *cntx_pointer,
              /* OUT   */ UCHAR  *cntx_idx,
              /* OUT   */ UCHAR  *srvc_type
          );

GA_RESULT vcp_free_context
          (
              /* IN */ UCHAR  cntx_idx,
              /* IN */ UCHAR  srvc_type
          );

void vcp_handle_vcs_composition
     (
         UINT8 ci,
         UINT16 status,
         GA_BRR_CHR_INFO * chr,
         UCHAR chr_cnt
     );

void vcp_handle_vocs_composition
     (
         UINT8 ci,
         UINT16 status,
         GA_BRR_CHR_INFO * chr,
         UCHAR chr_cnt
     );

void vcp_handle_aics_composition
     (
         UINT8 ci,
         UINT16 status,
         GA_BRR_CHR_INFO * chr,
         UCHAR chr_cnt
     );

GA_RESULT vcp_profile_callback
          (
              /* IN */ GA_BRR_DEVICE * device,
              /* IN */ void * context,
              /* IN */ UINT8 event_type,
              /* IN */ UINT16 event_status,
              /* IN */ void * event_data,
              /* IN */ UINT16 event_datalen
          );

GA_RESULT vcp_service_callback
          (
              /* IN */ GA_BRR_DEVICE * device,
              /* IN */ void * context,
              /* IN */ UINT8 event_type,
              /* IN */ UINT16 event_status,
              /* IN */ void * event_data,
              /* IN */ UINT16 event_datalen
          );

void vcp_handle_read_request
     (
         /* IN */ GA_ENDPOINT * device,
         /* IN */ GA_BRR_CHR_CONTEXT * chr,
         /* IN */ UINT16 event_status,
         /* IN */ UCHAR * event_data,
         /* IN */ UINT16 event_datalen
     );

void vcp_handle_write_request
     (
         /* IN */ GA_ENDPOINT * device,
         /* IN */ GA_BRR_CHR_CONTEXT * chr,
         /* IN */ UINT16 event_status,
         /* IN */ UCHAR * event_data,
         /* IN */ UINT16 event_datalen
     );

void vcp_handle_config_request
     (
         /* IN */ GA_ENDPOINT * device,
         /* IN */ GA_BRR_CHR_CONTEXT * chr,
         /* IN */ UINT16 event_status,
         /* IN */ UCHAR * event_data,
         /* IN */ UINT16 event_datalen
     );

#endif /* _H_VCP_INTERNAL */



